#include "complex.h"
#include <iostream>
using namespace std;

Complex::Complex(int real, int img)
	:real(real),
	img(img)
{

}

void Complex::display() const
{
	cout << real << " + " << img << "i" << endl;
}

const Complex Complex::operator + (const Complex& rhs) const
{
	int real = this->real + rhs.real;
	int img = this->img + rhs.img;
	return Complex(real, img);
}

const Complex Complex::operator - (const Complex& rhs) const
{
	int real = this->real - rhs.real;
	int img = this->img - rhs.img;
	return Complex(real, img);
}
